<!--  -->
<template>
  <uni-popup ref="popup" type="dialog">
    <view class="dialog-body bg-white rounded-sm">
      <view class="p-40">
        <view class="text-lg text-center">温馨提示</view>
        <view class="text-base pt-40">
          <text class="">请您仔细阅读并充分理解相关条款，点击同意即代表您已阅读并同意</text>
          <text class="blue" @tap.stop="$emit('check-agreement', 1)">《用户服务协议》</text>
          <text class="">与</text>
          <text class="blue" @tap.stop="$emit('check-agreement', 2)">《隐私政策》</text>
        </view>
      </view>
      <view class="p-20 flex justify-between">
        <button class="my-button grey" @click.stop="$refs.popup.close()">不同意</button>
        <view class="pl-20"></view>
        <button open-type="getPhoneNumber" @getphonenumber="$emit('getPhoneNumber', $event)" class="my-button blue">同意</button>
      </view>
    </view>
  </uni-popup>
</template>

<script>
export default {
  methods: {
    open() {
      this.$refs.popup.open()
    }
  }
}
</script>

<style scoped lang="scss">
.dialog-body {
  width: 600rpx;
}
.blue {
  color: #5480f8;
}
.grey {
  color: grey;
}
.my-button {
  flex: 1;
  margin: 0;
  font-size: 32rpx;
  background-color: #fff;
}

.p-40 {
  padding: 40rpx !important;
}
.pt-40 {
  padding-top: 40rpx !important;
}
.p-20 {
  padding: 20rpx !important;
}
.pl-20 {
  padding-left: 20rpx !important;
}
</style>